package com.appkubes.mall.restful.application.activity.apply.controller;

import com.appkubes.cloud.config.params.paramValid.ParamValid;
import com.appkubes.common.Response;
import com.appkubes.mall.core.controller.BaseMallActivityApplyController;
import com.appkubes.mall.restful.application.activity.apply.entity.dto.ApplyListDTO;
import com.appkubes.mall.restful.application.activity.apply.entity.vo.ApplyListVO;
import com.appkubes.mall.restful.application.activity.apply.service.ActivityApplyService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Lin Jiaming
 * @Date: 2020/3/6
 * @Description:
 */
@Api(tags = "活动申请模块")
@RestController
@RequestMapping(value = "/activity/apply")
public class ActivityApplyController extends BaseMallActivityApplyController {

    @Autowired
    ActivityApplyService activityApplyService;

    @ApiOperation(value = "活动列表（样品申请列表）")
    @PostMapping(value = "/applyList")
    public Response applyList(@ParamValid ApplyListVO applyListVO){
        IPage<ApplyListDTO> applyList = activityApplyService.applyList(applyListVO);
        return Response.success(applyList);
    }
}
